package puzzle.common.point;

import tomoto.util.Pair;

public class Loop {
	private int m_leg;
	private Pair<Pnt> m_ends;
	private int m_endDistance;
	
	public Loop(Pair<Pnt> ends, int leg) {
		m_leg = leg;
		m_ends = ends;
		m_endDistance = m_ends.car.getManhattanDistanceTo(m_ends.cdr);
	}
	
	public boolean isOpen() {
		return m_endDistance != 0;
	}

	public int getLeg() {
		return m_leg;
	}

	public Pair<Pnt> getEnds() {
		return m_ends;
	}

	public int getEndDistance() {
		return m_endDistance;
	}

}
